/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_ypcontents")
public class TYpContents implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "contentid")
    private String contentid;

    @Basic(optional = false)
    @Column(name = "contenttitle")
    private String contenttitle;
    
    @Column(name = "area")
    private String area;
    
    @Column(name = "area_province")
    private Integer area_province;
    
    @Column(name = "area_city")
    private Integer area_city;
    
    @Column(name = "area_county")
    private Integer area_county;
    
    @Column(name = "html")
    private String html;
    
    @Column(name = "updatetime")
    private Date updatetime;
    
    @Basic(optional = false)
    @Column(name = "user_id")
    private String userId;
    
    @Basic(optional = false)
    @Column(name = "content_status")
    private String contentStatus;
    @Column(name = "cause")
    private String cause;
    @Column(name = "comment")
    private String comment;
    

    @OneToMany(mappedBy = "contentid", fetch = FetchType.LAZY)
    private Set<NewsContenttitle> newsContenttitleSet;
	
	public TYpContents() {
    }

    public TYpContents(String contentid) {
        this.contentid = contentid;
    }

    public TYpContents(String contentid, String userId, String serviceCode, String contentName, String contentType, String contentStatus) {
        this.contentid = contentid;
        this.userId = userId;
        this.contentStatus = contentStatus;
    }

    public String getContentid() {
        return contentid;
    }

    public void setContentid(String contentid) {
        this.contentid = contentid;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }


    public String getContentStatus() {
        return contentStatus;
    }

    public void setContentStatus(String contentStatus) {
        this.contentStatus = contentStatus;
    }


    /**
	 * contenttitle
	 *
	 * @return  the contenttitle
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getContenttitle() {
		return contenttitle;
	}

	/**
	 * @param contenttitle the contenttitle to set
	 */
	public void setContenttitle(String contenttitle) {
		this.contenttitle = contenttitle;
	}
	

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public Integer getArea_province() {
		return area_province;
	}

	public void setArea_province(Integer area_province) {
		this.area_province = area_province;
	}

	public Integer getArea_city() {
		return area_city;
	}

	public void setArea_city(Integer area_city) {
		this.area_city = area_city;
	}

	public Integer getArea_county() {
		return area_county;
	}

	public void setArea_county(Integer area_county) {
		this.area_county = area_county;
	}

	/**
	 * html
	 *
	 * @return  the html
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getHtml() {
		return html;
	}

	/**
	 * @param html the html to set
	 */
	public void setHtml(String html) {
		this.html = html;
	}

	/**
	 * updatetime
	 *
	 * @return  the updatetime
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Date getUpdatetime() {
		return updatetime;
	}

	/**
	 * @param updatetime the updatetime to set
	 */
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	/**
	 * comment
	 *
	 * @return  the comment
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getComment() {
		return comment;
	}

	/**
	 * @param comment the comment to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}

	@Override
    public int hashCode() {
        int hash = 0;
        hash += (contentid != null ? contentid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TYpContents)) {
            return false;
        }
        TYpContents other = (TYpContents) object;
        if ((this.contentid == null && other.contentid != null) || (this.contentid != null && !this.contentid.equals(other.contentid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TYpContents[contentid=" + contentid + "]";
    }

	/**
	 * cause
	 *
	 * @return  the cause
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getCause() {
		return cause;
	}

	/**
	 * @param cause the cause to set
	 */
	public void setCause(String cause) {
		this.cause = cause;
	}

	/**
	 * newsContenttitleSet
	 *
	 * @return  the newsContenttitleSet
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Set<NewsContenttitle> getNewsContenttitleSet() {
		return newsContenttitleSet;
	}

	/**
	 * @param newsContenttitleSet the newsContenttitleSet to set
	 */
	public void setNewsContenttitleSet(Set<NewsContenttitle> newsContenttitleSet) {
		this.newsContenttitleSet = newsContenttitleSet;
	}


}
